package com.hzncc.flowable_diboot.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;


import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* 消息记录 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-05-29
* Copyright © MyCorp
*/

@TableName("mdl_message_record")
@Getter @Setter @Accessors(chain = true)
public class MessageRecord extends BaseModel {
    private static final long serialVersionUID = 1648441020390719152L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 消息内容
     */
    @Length(max=500, message="消息内容长度应小于500")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String messageContent;

    /**
     * 标题
     */
    @Length(max=100, message="标题长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String title;

    /**
     * 是否发送
     */
    @TableField()
    private Boolean isSend;

    /**
     * 是否查看
     */
    @TableField()
    private Boolean isView;

    /**
     * 接收人
     */
    @TableField()
    private String receiver;

    /**
     * 消息类型
     */
    @Length(max=100, message="消息类型长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String type;

    /**
     * 查看时间
     */
    @TableField()
    private LocalDateTime viewTime;

    /**
     * 发送人
     */
    @TableField()
    private String sender;

    /**
     * 功能模块
     */
    @Length(max=100, message="功能模块长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String module;

    /**
     * 发送时间
     */
    @TableField()
    private LocalDateTime sendTime;

    public MessageRecord(){}

}